<?php

/**
 * Feedback Model
 *
 */
class Feedback_Model_Feedback
{
    const RESOURCE_NAME='feedback';

    /**
     * Sends feedback message
     */
    static function send($name,$email,$message)
    {
        $message.="\r\n\r\n".Zend_Registry::get('locale')->_('Sender').': '.$name.' ('.$email.')';
        
        $mail = new Zend_Mail('UTF-8');
        $mail->setHeaderEncoding(Zend_Mime::ENCODING_BASE64);
        $mail->setBodyText($message);
        $mail->setFrom($email, $name);
        $mail->addTo(Zend_Registry::get('config')->site->contact_email, Zend_Registry::get('config')->site->contact_name);
        $mail->setSubject(ucwords($_SERVER['HTTP_HOST']).': '.Zend_Registry::get('locale')->_('Feedback'));
        $mail->send();
    }
}
